package com.zhenxiang.juc.function;

import java.util.function.Predicate;

/**
 * @Author : James
 * @Create : 2021-12-27-15:51
 * @Description :
 *  断定型接口 只能有一个输入参数，返回值是boolean类型
 *
 */
public class Demo02 {
    public static void main(String[] args) {

       /* Predicate<String> predicate = new Predicate<String>() {
            @Override
            public boolean test(String str) {
                return str.isEmpty();
            }
        };
        System.out.println(predicate.test(""));*/

        Predicate<String> predicate = (str)-> {return str.isEmpty();};
        System.out.println(predicate.test(""));

    }
}
